<script>
export default {
  name: "SxFilterSearchFilterFooter",
  functional: true,
  render(h, { listeners, scopedSlots }) {
    const { search, reset, setting, store } = listeners;
    const footerSlot = scopedSlots.default;
    const buttonGroup = [
      <el-button
        icon="el-icon-refresh"
        size={store.getters.size}
        type="danger"
        onClick={reset}
        plain
      >
        重置
      </el-button>,
      <el-button
        icon="el-icon-search"
        size={store.getters.size}
        type="primary"
        onClick={search}
        plain
      >
        搜索
      </el-button>,
      <el-button
        type="primary"
        icon="el-icon-s-tools"
        size={store.getters.size}
        onClick={setting}
        plain
      >
        设置
      </el-button>
    ];
    return (
      <el-button-group class="SxFilterSearchFilterFooter">
        {footerSlot ? footerSlot() : buttonGroup}
      </el-button-group>
    );
  }
};
</script>

<style scoped lang="scss">
.SxFilterSearchFilterFooter {
  left: 0;
  flex: 1;
  box-sizing: border-box;
  margin-left: 20px;
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
  // .el-button {
  //   margin-top: 5px;
  //   margin-left: 10px;
  // }
}
</style>
